package one.stand.feign;

import one.stand.entity.excel.CustomerExcelEntity;
import one.stand.fallback.CrmFallBack;
import one.stand.model.ResultModel;
import one.stand.request.*;
import one.stand.response.*;
import one.stand.util.ExportDataDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
@Component
@FeignClient(value = "crm-service", fallback = CrmFallBack.class, decode404 = true)
public interface CrmFegin {

    @PostMapping("companyAccount/getCompanyAccountList")
    ResultModel<List<CompanyAccountResponse>> getCompanyAccountList(@RequestBody CompanyAccountRequest request);


    /**
     * CRM-PC端首页统计
     *
     * @param request
     * @return
     */
    @PostMapping("seeRecord/getPcCount")
    ResultModel<Map<String, Object>> getPcCount(@RequestBody SeeRecordRequest request);

    /**
     * CRM-PC端首页转化率漏斗
     *
     * @param request
     * @return
     */
    @PostMapping("seeRecord/getChangeCount")
    ResultModel<Map<String, Object>> getChangeCount(@RequestBody SeeRecordRequest request);

    /**
     * 圆饼图
     *
     * @param request
     * @return
     */
    @PostMapping("seeRecord/countCustomerAnalysis")
    ResultModel countCustomerAnalysis(@RequestBody SeeRecordRequest request);

    /**
     * 近7日成交额
     *
     * @return
     */
    @RequestMapping("dataCount/sevenData")
    ResultModel sevenData(@RequestBody FinanceRequest request);

    /**
     * 获取公司员工
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/getCompanyStaffList")
    ResultModel<Map<String, Object>> getCompanyStaffList(@RequestBody BusinessCardRequest request);

    /**
     * 得到公司员工信息
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/getCompanyStaffInfo")
    ResultModel<GetCompanyStaffResponse> getCompanyStaffInfo(@RequestBody BusinessCardRequest request);

    /**
     * 企业员工退出企业
     *
     * @param request
     * @return
     */
    @PostMapping("userTask/quitCompany")
    ResultModel quitCompany(@RequestBody BusinessCardRequest request);

    /**
     * 存为客户
     *
     * @param request
     * @return
     */
    @PostMapping("customer/addCustomer")
    ResultModel<Boolean> addCustomer(@RequestBody CustomerRequest request);

    /**
     * 客户类型分组统计
     *
     * @param request
     * @return
     */
    @PostMapping("customer/countCustomer")
    ResultModel<List<CustomerResponse>> countCustomer(@RequestBody CustomerRequest request);

    /**
     * 获取客户列表
     *
     * @param request
     * @return
     */
    @PostMapping("customer/getCustomerPC")
    ResultModel<Map<String, Object>> getCustomerPC(@RequestBody CustomerRequest request);

    /**
     * 导出获取客户列表
     *
     * @return
     */
    @PostMapping("customer/getCustomerExport")
    ResultModel<ExportDataDTO<CustomerExcelEntity>> getCustomerExport(@RequestBody CustomerRequest request);

    /**
     * 获取客户信息
     *
     * @param cardId
     * @return
     */
    @PostMapping("customer/getCustomerInfo")
    ResultModel<GetCustomerInfoResponse> getCustomerInfo(@RequestParam("cardId") Long cardId);

    /**
     * 手动创建客户
     *
     * @return
     */
    @PostMapping("customer/manualAdd")
    ResultModel<Boolean> manualAdd(@RequestBody CustomerRequest request);

    /**
     * 修改客户类型
     *
     * @return
     */
    @PostMapping("customer/updCustomer")
    ResultModel<Boolean> updCustomer(@RequestBody CustomerRequest request);

    /**
     * 录入成交金额
     *
     * @return
     */
    @PostMapping("/customer/inputDealMoney")
    ResultModel<Boolean> inputDealMoney(@RequestBody InputDealMoneyRequest request);

    /**
     * 删除成交记录表图片
     *
     * @return
     */
    @PostMapping("/customer/delInputDealPhotos")
    ResultModel<Boolean> delInputDealPhotos(@RequestBody InputDealMoneyRequest request);

    /**
     * 企业客户下拉框
     *
     * @param request
     * @return
     */
    @PostMapping("customer/getCustomerList")
    ResultModel<List<CustomerResponse>> getCustomerList(@RequestBody CustomerRequest request);

    /**
     * 获取成交记录
     *
     * @param request
     * @return
     */
    @PostMapping("inputDealMoney/getInputDealList")
    ResultModel<List<InputDealMoneyResponse>> getInputDealList(@RequestBody InputDealMoneyRequest request);

    /**
     * 修改客户标签
     *
     * @param request
     * @return
     */
    @PostMapping("customer/updCustomerLabel")
    ResultModel<String> updCustomerLabel(@RequestBody CustomerRequest request);

    /**
     * 修改客户类型
     *
     * @param request
     * @return
     */
    @PostMapping("customer/updBatchCustomerState")
    ResultModel<String> updBatchCustomerState(@RequestBody CustomerRequest request);

    /**
     * 添加标签
     *
     * @param request
     * @return
     */
    @PostMapping("companyCustomerLable/addLable")
    ResultModel<Long> addLable(@RequestBody CompanyCustomerLableRequest request);

    /**
     * 添加标签list
     *
     * @param request
     * @return
     */
    @PostMapping("companyCustomerLable/addLableList")
    ResultModel<Boolean> addLableList(@RequestBody CompanyCustomerLableRequest request);

    /**
     * 删除标签
     *
     * @param request
     * @return
     */
    @PostMapping("companyCustomerLable/delLable")
    ResultModel<Boolean> delLable(@RequestBody CompanyCustomerLableRequest request);


    /**
     * 获取客户标签树
     *
     * @param request
     * @return
     */
    @PostMapping("companyCustomerLable/getTree")
    ResultModel<List<CompanyCustomerLableResponse>> getTree(@RequestBody CompanyCustomerLableRequest request);


    /**
     * 修改标签
     *
     * @param request
     * @return
     */
    @PostMapping("companyCustomerLable/updLable")
    ResultModel<Boolean> updLable(@RequestBody CompanyCustomerLableRequest request);

    /**
     * 企业员工移交客户
     *
     * @param request
     * @return
     */
    @PostMapping("userTask/moveCustomer")
    ResultModel moveCustomer(@RequestBody CustomerRequest request);

    /**
     * 录入跟进记录
     *
     * @param request
     * @return
     */
    @PostMapping("followRecord/addFollow")
    ResultModel<Boolean> addFollow(@RequestBody FollowRecordRequest request);

    /**
     * 获取跟进记录
     *
     * @param request
     * @return
     */
    @PostMapping("followRecord/getFollowList")
    ResultModel<List<FollowRecordResponse>> getFollowList(@RequestBody FollowRecordRequest request);

    /**
     * 根据公司ID查询产品分类（包含商品信息）
     */
    @PostMapping("goods/selectGoodsTypeInfoPC")
    ResultModel<Map<String, Object>> selectGoodsTypeInfoPC(@RequestBody GoodstypeRequest request);

    /**
     * 查询简单商品分类
     */
    @PostMapping("goods/getGoodsTypeInfo")
    ResultModel getGoodsTypeInfo(@RequestBody GoodstypeRequest request);

    /**
     * 添加/修改商品分类
     */
    @PostMapping("goods/addGoodsType")
    ResultModel addGoodsType(@RequestBody GoodstypeRequest request);

    /**
     * 删除商品分类
     */
    @PostMapping("goods/delGoodsType")
    ResultModel delGoodsType(@RequestBody GoodstypeRequest request);

    /**
     * 上移/下移商品分类
     */
    @PostMapping("goods/moveGoodsType")
    ResultModel moveGoodsType(@RequestBody GoodstypeRequest request);

    /**
     * 查询商品信息
     */
    @PostMapping("goods/getGoodsInfoPC")
    ResultModel<Map<String, Object>> getGoodsInfoPC(@RequestBody GoodsRequest request);

    /**
     * 移动商品信息
     */
    @PostMapping("goods/moveGoodsInfo")
    ResultModel<Boolean> moveGoodsInfo(@RequestBody GoodsRequest request);

    /**
     * 添加/修改商品信息
     */
    @PostMapping("goods/addGoodsInfo")
    ResultModel addGoodsInfo(@RequestBody GoodsRequest request);

    /**
     * 添加/修改商品信息list
     */
    @PostMapping("goods/addGoodsInfoList")
    ResultModel addGoodsInfoList(@RequestBody GoodsRequest request);

    /**
     * 添加/修改商品信息
     */
    @PostMapping("goods/addGoodSpecInfo")
    ResultModel addGoodSpecInfo(@RequestBody GoodSpecRequest request);

    /**
     * 删除商品信息
     */
    @PostMapping("goods/delGoodsInfo")
    ResultModel delGoodsInfo(@RequestBody GoodsRequest request);

    /**
     * 删除商品信息
     */
    @PostMapping("goods/delGoodSpecInfo")
    ResultModel delGoodSpecInfo(@RequestBody GoodSpecRequest request);

    /**
     * 个人企业信息
     * @param request
     * @return
     */
    @PostMapping("company/getCompany")
    ResultModel<CompanyResponse> getCompany(@RequestBody CompanyRequest request);

    /**
     * 修改公司
     *
     * @param request
     * @return
     */
    @PostMapping("company/updCompany")
    ResultModel<Boolean> updCompany(@RequestBody CompanyRequest request);

    /**
     * crmPC-支付
     *
     * @param request
     * @return
     */
    @PostMapping("company/payment")
    ResultModel<String> payment(@RequestBody CompanyAccountRequest request);

    @PostMapping("company/backPayMent")
    String backPayMent(String request);

    /**
     * 转移产品
     */
    @PostMapping("goods/transferGoods")
    ResultModel transferGoods(@RequestBody GoodsRequest request);

    /**
     * 获取员工列表
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/getList")
    ResultModel<List<BusinessCardResponse>> getList(@RequestBody BusinessCardRequest request);

    /**
     * 获取行业
     *
     * @param
     * @return
     */
    @PostMapping("industry/getList")
    ResultModel<List<IndustryResponse>> getList();

    /**
     * 获取员工详细信息
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/getCompanyUserInfo")
    ResultModel getCompanyUserInfo(@RequestBody BusinessCardRequest request);

    /**
     * 审核名片
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/auditBusinessCard")
    ResultModel auditBusinessCard(@RequestBody BusinessCardRequest request);


    /**
     * 验证名片是否过期
     */
    @PostMapping("/businessCard/verifyExpired")
    ResultModel<Long> verifyExpired(@RequestBody BusinessCardRequest request);

    /**
     * 根据公司查询订单("订单状态（1待付款，2待发货，3待收货，4已完成，5交易取消，6退款成功）")
     */
    @PostMapping("orders/selectOrdersInfoPc")
    ResultModel<Map<String, Object>> selectOrdersInfoPc(@RequestBody OrdersRequest request);

    /**
     * 查询订单详情
     */
    @PostMapping("orders/getOrdersInfo")
    ResultModel<List<OrdersResponse>> getOrdersInfo(@RequestBody OrdersRequest request);

    /**
     * 修改订单状态("订单状态（1待付款，2待发货，3待收货，4已完成，5交易取消，6退款成功）")
     * 撤销订单，确认发货
     */
    @PostMapping("orders/updateOrderState")
    ResultModel updateOrderState(@RequestBody OrdersRequest request);

    /**
     * 修改订单退款状态1未申请，2退款申请中，3退款成功
     */
    @PostMapping("orders/updateRefundState")
    ResultModel updateRefundState(@RequestBody OrdersRequest request);

    /**
     * 删除已过期的订单信息
     */
    @PostMapping("orders/delOrders")
    ResultModel delOrders(@RequestBody OrdersRequest request);

    /**
     * 分销管理-数据统计
     */
    @PostMapping("distribution/getRoyaltyData")
    ResultModel<Map<String, Object>> getRoyaltyData(@RequestBody RoyaltyRecordRequest request);

    /**
     * 设置分销金额比例
     */
    @PostMapping("distribution/companyRoyalty")
    ResultModel<Boolean> companyRoyalty(@RequestBody CompanyRoyaltyRequest request);

    /**
     * 设置分销金额比例 3.2版本迭代
     */
    @PostMapping("distribution/insertCompanyRoyalty")
    ResultModel<Boolean> insertCompanyRoyalty(@RequestBody CompanyRoyaltyRequest request);

    /**
     * 分销订单列表
     */
    @PostMapping("distribution/selectRoyaltyOrderList")
    ResultModel selectRoyaltyOrderList(@RequestBody OrdersRequest request);

    /**
     * 分销订单详情
     */
    @PostMapping("distribution/getRoyaltyOrderInfo")
    ResultModel getRoyaltyOrderInfo(@RequestBody OrdersRequest request);

    /**
     * 佣金排行列表
     */
    @PostMapping("distribution/selectRoyaltyRankList")
    ResultModel<Map<String, Object>> selectRoyaltyRankList(@RequestBody RoyaltyRecordRequest request);

    /**
     * 企业到账记录列表
     *
     * @param request
     * @return
     */
    @PostMapping("distribution/selectCompanyTransferList")
    ResultModel<Map<String, Object>> selectCompanyTransferList(@RequestBody CompanyTransferRequest request);

    /**
     * 更改企业到账记录结算状态
     *
     * @param request
     * @return
     */
    @PostMapping("distribution/updateCompanyTransferState")
    ResultModel<Boolean> updateCompanyTransferState(@RequestBody CompanyTransferRequest request);

    /**
     * 更改佣金列表结算状态
     *
     * @return
     */
    @PostMapping("distribution/updateRoyaltyRecordState")
    ResultModel<Boolean> updateRoyaltyRecordState(@RequestBody RoyaltyRecordRequest request);

    /**
     * 企业移交
     * @param companyRequest
     * @return
     */
    @PostMapping("company/companyTransfer")
    ResultModel<Boolean> companyTransfer(@RequestBody CompanyRequest companyRequest);

    /**
     * 查询代理商企业下公司的信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/selectAgentCompanyList")
    ResultModel<Map<String, Object>> selectAgentCompanyList(@RequestBody CompanyRequest request);

    /**
     * 查询代理商企业下公司的信息
     * @return
     */
    @PostMapping("company/getAdminCompanyInfo")
    ResultModel<CompanyResponse> getAdminCompanyInfo(@RequestBody CompanyRequest request);

    /**
     * 根据公司ID查询预约管理中预约列表数和产品管理数
     */
    @PostMapping("products/getProductsCount")
    ResultModel<Map<String, Object>> getProductsCount(@RequestBody AppointmentRequest request);

    /**
     * 查询公司预约商品类型（下拉框显示）
     */
    @PostMapping("products/selectProductsTypeList")
    ResultModel<List<ProductsTypeResponse>> selectProductsTypeList(@RequestBody ProductsTypeRequest request);

    /**
     * 分页查询公司预约商品类型
     */
    @PostMapping("products/selectProductsTypePage")
    ResultModel<Map<String, Object>> selectProductsTypePage(@RequestBody ProductsTypeRequest request);

    /**
     * 查询公司预约商品类型（包含类型下的商品信息）
     */
    @PostMapping("products/selectProductsType")
    ResultModel<List<ProductsTypeResponse>> selectProductsType(@RequestBody ProductsTypeRequest request);

    /**
     * 新增/修改预约商品类型
     */
    @PostMapping("products/insertProductsType")
    ResultModel<Boolean> insertProductsType(@RequestBody ProductsTypeRequest request);

    /**
     * 删除预约商品类型
     */
    @PostMapping("products/delProductsType")
    ResultModel<Boolean> delProductsType(@RequestBody ProductsTypeRequest request);

    /**
     * 上移/下移商品类型
     */
    @PostMapping("products/moveProductsType")
    ResultModel<Boolean> moveProductsType(@RequestBody ProductsTypeRequest request);

    /**
     * 分页查询公司预约商品信息
     */
    @PostMapping("products/selectProductsPage")
    ResultModel<Map<String, Object>> selectProductsPage(@RequestBody ProductsRequest request);

    /**
     * 查询公司预约商品信息
     */
    @PostMapping("products/getProductsInfo")
    ResultModel<ProductsResponse> getProductsInfo(@RequestBody ProductsRequest request);

    /**
     * 新增/修改预约商品的信息
     */
    @PostMapping("products/insertProducts")
    ResultModel<Boolean> insertProducts(@RequestBody ProductsRequest request);

    /**
     * 删除预约商品的信息
     */
    @PostMapping("products/delProducts")
    ResultModel<Boolean> delProducts(@RequestBody ProductsRequest request);

    /**
     * 上移/下移预约商品
     */
    @PostMapping("products/moveProducts")
    ResultModel<Boolean> moveProducts(@RequestBody ProductsRequest request);

    /**
     * 分页查询预约列表
     */
    @PostMapping("products/selectAppointmentPage")
    ResultModel<Map<String, Object>> selectAppointmentPage(@RequestBody AppointmentRequest request);

    /**
     * 查询预约列表详情
     */
    @PostMapping("products/getAppointmentInfo")
    ResultModel<AppointmentResponse> getAppointmentInfo(@RequestBody AppointmentRequest request);

    /**
     * 新增预约订单
     */
    @PostMapping("products/insertAppointment")
    ResultModel<Boolean> insertAppointment(@RequestBody AppointmentRequest request);

    /**
     * 修改预约订单状态
     */
    @PostMapping("products/updAppointmentState")
    ResultModel<Boolean> updAppointmentState(@RequestBody AppointmentRequest request);

    /**
     * 分页查询企业配置图片
     *
     * @param request
     * @return
     */
    @PostMapping("companyPhoto/selectCompanyPhotoPage")
    ResultModel<Map<String, Object>> selectCompanyPhotoPage(@RequestBody CompanyPhotoRequest request);

    /**
     * 查询企业配置图片
     *
     * @param request
     * @return
     */
    @PostMapping("companyPhoto/selectCompanyPhoto")
    ResultModel<List<CompanyPhotoResponse>> selectCompanyPhoto(@RequestBody CompanyPhotoRequest request);

    /**
     * 广告图管理数量查询
     *
     * @param request
     * @return
     */
    @PostMapping("companyPhoto/selectTypeNum")
    ResultModel<List<Map<String, Object>>> selectTypeNum(@RequestBody CompanyPhotoRequest request);

    /**
     * 新增企业配置图片
     *
     * @param request
     * @return
     */
    @PostMapping("companyPhoto/insertCompanyPhoto")
    ResultModel<Boolean> insertCompanyPhoto(@RequestBody CompanyPhotoRequest request);

    /**
     * 上移/下移企业配置图片
     *
     * @param request
     * @return
     */
    @PostMapping("companyPhoto/moveCompanyPhoto")
    ResultModel<Boolean> moveCompanyPhoto(@RequestBody CompanyPhotoRequest request);

    /**
     * 删除企业配置图片
     *
     * @param request
     * @return
     */
    @PostMapping("companyPhoto/delCompanyPhoto")
    ResultModel<Boolean> delCompanyPhoto(@RequestBody CompanyPhotoRequest request);


    /**
     * 创建优惠券
     * @param request
     * @return
     */
    @PostMapping("company/coupon/add")
     ResultModel<Boolean> add(@RequestBody CompanyCouponRequest request);

    /**
     * 修改优惠券
     * @param request
     * @return
     */
    @PostMapping("company/coupon/upd")
    ResultModel<Boolean> upd(@RequestBody CompanyCouponRequest request);


    /**
     * 删除优惠券
     * @param request
     * @return
     */
    @PostMapping("company/coupon/del")
    ResultModel<Boolean> del(@RequestBody CompanyCouponRequest request);

    /**
     * 删除优惠券
     * @param request
     * @return
     */
    @PostMapping("company/coupon/crmPcPageList")
    ResultModel crmPcPageList(@RequestBody CompanyCouponRequest request);

    /**
     * 添加拼团配置
     */
    @PostMapping("assemble/insertGoodsAssemble")
    ResultModel<Boolean> insertGoodsAssemble(@RequestBody GoodsAssembleRequest request);

    /**
     * 拼团商品草稿箱列表
     */
    @PostMapping("assemble/selectGoodsAssembleDraftsPage")
    ResultModel<List<GoodsAssembleResponse>> selectGoodsAssembleDraftsPage(@RequestBody GoodsAssembleRequest request);

    /**
     * 拼团数据删除
     */
    @PostMapping("assemble/delGoodsAssembleInfo")
    ResultModel<Boolean> delGoodsAssembleInfo(@RequestBody GoodsAssembleRequest request);

    /**
     * 发布拼团配置
     */
    @PostMapping("assemble/releaseGoodsAssemble")
    ResultModel<Boolean> releaseGoodsAssemble(@RequestBody GoodsAssembleRequest request);

    /**
     * 拼团列表
     */
    @PostMapping("assemble/selectGoodsAssemblePage")
    ResultModel<List<AssembleResponse>> selectGoodsAssemblePage(@RequestBody AssembleRequest request);

    /**
     * 拼团详情
     */
    @PostMapping("assemble/getGoodsAssembleInfo")
    ResultModel<AssembleResponse> getGoodsAssembleInfo(@RequestBody AssembleRequest request);
}
